package org.dromara.system.domain.bo;

import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.system.domain.SysReportConfig;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.io.Serial;

/**
 * 报配置业务对象 sys_report_config
 *
 * @author yilong.fu
 * @date 2024-02-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysReportConfig.class, reverseConvertGenerate = false)
public class SysReportConfigBo extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 3471713127684321392L;
    /**
     *
     */
    @NotNull(message = "不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String name;

    /**
     * 编号
     */
    @NotBlank(message = "编号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String code;

    /**
     * 展示类型(page,list)
     */
    @NotBlank(message = "展示类型(page,list)不能为空", groups = {AddGroup.class, EditGroup.class})
    private String type;

    /**
     * 报表类型(sql,java)
     */
    @NotBlank(message = "报表类型(sql,java)不能为空", groups = {AddGroup.class, EditGroup.class})
    private String contentType;

    /**
     * SQL内容
     */
    @NotBlank(message = "SQL内容不能为空", groups = {AddGroup.class, EditGroup.class})
    private String content;

    /**
     * 数据头(用JSON结构来描述列表的头字段(name,code,hidden,length) 例如:[{"name":"编号","code":"id","hidden":"false"}])
     */
    @NotBlank(message = "数据头不能为空", groups = {AddGroup.class, EditGroup.class})
    private String header;

    /**
     * 查询条件
     */
    @NotBlank(message = "查询条件不能为空", groups = {AddGroup.class, EditGroup.class})
    private String searchConfig;

    /**
     * JAVA数据提取
     */
    @NotBlank(message = "JAVA数据提取不能为空", groups = {AddGroup.class, EditGroup.class})
    private String cls;

    /**
     * 生成数据格式化的实现类
     */
    @NotBlank(message = "生成数据格式化的实现类不能为空", groups = {AddGroup.class, EditGroup.class})
    private String filter;

    /**
     * 报表备注
     */
    @NotBlank(message = "报表备注不能为空", groups = {AddGroup.class, EditGroup.class})
    private String remark;

    /**
     * 格式化SQL
     */
    @NotBlank(message = "格式化SQL不能为空", groups = {AddGroup.class, EditGroup.class})
    private String filterSql;

    /**
     * 格式化SQL
     */
    @NotBlank(message = "格式化SQL不能为空", groups = {AddGroup.class, EditGroup.class})
    private String filterSql1;

    /**
     * 格式化SQL
     */
    @NotBlank(message = "格式化SQL不能为空", groups = {AddGroup.class, EditGroup.class})
    private String filterSql2;

    /**
     * 格式化SQL
     */
    @NotBlank(message = "格式化SQL不能为空", groups = {AddGroup.class, EditGroup.class})
    private String filterSql3;

    /**
     * 行高
     */
    @NotNull(message = "行高不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long rowHeight;

    /**
     * 菜单配置
     */
    @NotBlank(message = "菜单配置不能为空", groups = {AddGroup.class, EditGroup.class})
    private String menuConfig;


}
